package cn.dgut.training.vo.transaction;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class OrderGoodsVO implements Serializable {

    @ApiModelProperty(value = "订单商品表的ID")
    private Long id;

    @ApiModelProperty(value = "订单表的订单ID")
    private Long orderId;

    @ApiModelProperty(value = "商品表的商品ID")
    private Long goodsId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品编号")
    private String goodsSn;

    @ApiModelProperty(value = "商品货品表的货品ID")
    private Long productId;

    @ApiModelProperty(value = "商品货品的购买数量")
    private Integer number;

    @ApiModelProperty(value = "商品货品的售价")
    private BigDecimal price;

    @ApiModelProperty(value = "商品货品图片或者商品图片")
    private String picUrl;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date addTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date updateTime;

    @ApiModelProperty(value = "订单商品评论，如果是-1，则超期不能评价；如果是0，则可以评价；如果其他值，则是comment表里面的评论ID。")
    private Integer comment;
}
